package spittr.config;

import javax.servlet.MultipartConfigElement;
import javax.servlet.ServletRegistration.Dynamic;

import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

import javafx.scene.layout.Region;

public class SpitterWebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {

	@Override
	protected String[] getServletMappings() {
		System.out.println("[welkin] getServletMapping");
		return new String[] { "/" };
	}

	@Override
	protected Class<?>[] getRootConfigClasses() {
		System.out.println("[welkin]getRootConfigClasses");
		return new Class<?>[] { RootConfig.class };
	}

	@Override
	protected Class<?>[] getServletConfigClasses() {
		System.out.println("[welkin]getServletconfigClasses");
		return new Class<?>[] { WebConfig.class };
	}
	
	@Override
	protected void customizeRegistration(Dynamic registration) {

	registration.setMultipartConfig(new MultipartConfigElement("/"));
//		registration.setMultipartConfig(new MultipartConfigElement(""));
	}
}
